<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>layuiAdmin 内容系统 - 文章列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../static/layui/dist/layuiadmin/layui/css/layui.css" media="all">

<body>
    <div style="margin: 30px ;">
        <div class="layui-fluid">
            <div class="layui-row">
                <div class="layui-col-xs-6">
                    <div class="demoTable">
                        搜索日志id：
                        <div class="layui-inline">
                            <input class="layui-input" name="keyword" id="demoReload" autocomplete="off">
                        </div>
                        <button class="layui-btn" data-type="reload">搜索</button>
                    </div>
                </div>
            </div>
        </div>
        <table class="layui-hide" id="LAY_table_user" lay-filter="useruv"></table>
    </div>
    <script src="../../../static/layui/dist/layuiadmin/layui/layui.js"></script>
    <script>
        layui.use('table', function () {
            var table = layui.table;

            //方法级渲染
            table.render({
                elem: '#LAY_table_user'
                , url: 'log_init'
                , cols: [[
                    { field: 'id', title: 'ID', width: 300, sort: true, fixed: true }
                    , { field: 'content', title: '操作url', width: 500, sort: true }
                    , { field: 'user_name', title: '操作人', width: 300, sort: true, edit: true }
                    , { field: 'add_time', title: '操作时间', width: 300, sort: true, edit: true }
                ]]
                , id: 'testReload'
                , page: true
                , height: 600
                , size: "lg"
            });
            var $ = layui.$, active = {
                reload: function () {
                    var demoReload = $('#demoReload');

                    table.reload('testReload', {
                        page: {
                            curr: 1
                        },
                        where: {
                            keyword: demoReload.val()
                        }
                    });
                }
            };
        })
    </script>

</body>

</html>